package net.llz.chain;

public class Main {
    public static void main(String[] args) {


        RiskControlManager firstControlManager = new FirstRiskControlManager("初级风控");

        RiskControlManager secondControlManager = new SecondRiskControlManager("中级风控");

        RiskControlManager thirdControlManager = new ThirdRiskControlManager("高级风控");

        //形成调用链
        firstControlManager.setSuperior(secondControlManager);
        secondControlManager.setSuperior(thirdControlManager);


        //使用
        Request request1 = new Request();
        request1.setRequestType(RequestType.CASH_OUT.name());
        request1.setMoney(2000);
        firstControlManager.handlerRequest(request1);

    }
}
